function toUpdataAddress(addressId) {
	var productId = '';
	if($("#dataInfo").find("input[name='productId']").length != 0) {
		productId += $("#hidden_productId").val();
	}
	var storageId = '';
	if($("#dataInfo").find("input[name='storageId']").length != 0) {
		storageId += $("#hidden_storageDeliveryFeeId").val();
	}
	var receiverId = $("#receiverId").val();
	var initTotalPrice = $("#init_totalPrice").val();
	var totalPrice = $("#hidden_totalPrice").val();
	var paymentMethodId = $("#hidden_paymentMethodId").val();
	var shippingMethodId = $("#hidden_shippingMethodId").val();
	var selectedPhoneNum = $("#hidden_selectedPhoneNum").val();
	var isOpenCallsDisplay = $("#hidden_isOpenCallsDisplay").val();
	var phonePackageId = $("#hidden_phonePackageId").val();
	var userName = $("#hidden_userName").val();
	var certNumber = $("#hidden_certNumber").val();
	var cloudServiceId = $("#hidden_cloudServiceId").val();
	var whetherInvoice = $("#hidden_whetherInvoice").val();
	var cloundServicesPhone = $("#cloundServicesPhone").val();
	var packageWrapItemIds = '';
	if($("#dataInfo").find("input[name='packageWrapItemIds']").length != 0) {
		packageWrapItemIds += $("#hidden_packageWrapItemIds").val();
	}
	
	
	window.location.href = "updateBySelectNumber.jhtml?id="+ addressId + "&cloundServicesPhone=" + cloundServicesPhone +"&productId="+ productId +"&receiverId="+ receiverId +"&initTotalPrice="+ initTotalPrice +"" +
	"&totalPrice="+ totalPrice +"&paymentMethodId="+ paymentMethodId +"&shippingMethodId="+ shippingMethodId +"&whetherInvoice="+ whetherInvoice +"" +
	"&selectedPhoneNum="+ selectedPhoneNum +"&isOpenCallsDisplay="+ isOpenCallsDisplay +"&phonePackageId="+ phonePackageId +"&userName="+ userName +"" +
	"&certNumber="+ certNumber +"&cloudServiceId="+ cloudServiceId +"&storageId="+ storageId +"&packageWrapItemIds="+ packageWrapItemIds +"";
}
//返回上级页面
function returnSuperior(addressId) {
	$("#hidden_addressId").attr("value", addressId);
	
	$.ajax({
		url: "returnSuperior.jhtml",
		type: "GET",
		data: $("#dataInfo").serialize(),
		dataType: "json",
		cache: false,
		async: false,
		success: function(data) {
			var productId = '';
			if(data.productId) {
				productId += data.productId;
			}
			var storageId = '';
			if(data.storageId) {
				storageId += data.storageId;
			}
			var addressId = $("#hidden_addressId").val();
			var receiverId = data.receiverId;
			var whetherInvoice = data.whetherInvoice;
			//var initTotalPrice = $("#init_totalPrice").val();
			var totalPrice ='' ;
			if(data.totalPrice == "null"){
				 totalPrice = "";
			}else{
				totalPrice = data.totalPrice;
			}
			
			//var paymentMethodId = $("#hidden_paymentMethodId").val();
			//var shippingMethodId = $("#hidden_shippingMethodId").val();
			var selectedPhoneNum = data.selectedPhoneNum;
			var isOpenCallsDisplay = data.isOpenCallsDisplay;
			var phonePackageId = '';
			if(data.phonePackageId){
				phonePackageId += data.phonePackageId;
			}
			var whetherInvoice = $("#hidden_whetherInvoice").val();
			var  cloundServicesPhone = "";
			if(data.cloundServicesPhone == ""){
				cloundServicesPhone = $("#cloundServicesPhone").val();
			}else{
				cloundServicesPhone = data.cloundServicesPhone;
			}
			var userName = data.userName;
			var certNumber = data.certNumber;
			var cloudServiceId = '';
			if(data.cloudServiceId){
				cloudServiceId += data.cloudServiceId;
			}
			var packageWrapItemIds = '';
			if(data.packageWrapItemIds) {
				packageWrapItemIds += data.packageWrapItemIds;
			}
			if(productId == "") {
				window.location.href = "weixinUpdateAddress.jhtml?id="+ addressId +"&receiverId="+ receiverId +"&cloundServicesPhone=" + cloundServicesPhone +"&whetherInvoice="+ whetherInvoice +"&totalPrice="+ totalPrice +
				"&selectedPhoneNum="+ selectedPhoneNum +"&isOpenCallsDisplay="+ isOpenCallsDisplay +"&phonePackageId="+ phonePackageId +"&userName="+ userName +"" +
				"&certNumber="+ certNumber +"&cloudServiceId="+ cloudServiceId +"&storageId="+ storageId +"&packageWrapItemIds="+ packageWrapItemIds +"";
			}else {
				window.location.href = "weixinUpdateAddressBySelectPhone.jhtml?id="+ addressId +"&productId="+ productId +"&receiverId="+ receiverId +"&whetherInvoice="+ whetherInvoice +"&totalPrice="+ totalPrice +
				"&selectedPhoneNum="+ selectedPhoneNum +"&isOpenCallsDisplay="+ isOpenCallsDisplay +"&phonePackageId="+ phonePackageId +"&userName="+ userName +"" +
				"&certNumber="+ certNumber + "&cloundServicesPhone=" + cloundServicesPhone + "&cloudServiceId="+ cloudServiceId +"&storageId="+ storageId +"&packageWrapItemIds="+ packageWrapItemIds +"";
			}
		}
	});
}
//跳转至新增收货地址页面
function toAddNewAddress() {
	var productId = '';
	if($("#dataInfo").find("input[name='productId']").length != 0) {
		productId += $("#hidden_productId").val();
	}
	
	var storageId = '';
	if($("#dataInfo").find("input[name='storageId']").length != 0) {
		storageId += $("#hidden_storageDeliveryFeeId").val();
	}
	var cloundServicesPhone = $("#cloundServicesPhone").val();
	var receiverId = $("#receiverId").val();
	var initTotalPrice = $("#init_totalPrice").val();
	var totalPrice = $("#hidden_totalPrice").val();
	var paymentMethodId = $("#hidden_paymentMethodId").val();
	var shippingMethodId = $("#hidden_shippingMethodId").val();
	var selectedPhoneNum = $("#hidden_selectedPhoneNum").val();
	var isOpenCallsDisplay = $("#hidden_isOpenCallsDisplay").val();
	var whetherInvoice = $("#hidden_whetherInvoice").val();
	var phonePackageId = $("#hidden_phonePackageId").val();
	var userName = $("#hidden_userName").val();
	var certNumber = $("#hidden_certNumber").val();
	var cloudServiceId = $("#hidden_cloudServiceId").val();
	var packageWrapItemIds = '';
	if($("#dataInfo").find("input[name='packageWrapItemIds']").length != 0) {
		packageWrapItemIds += $("#hidden_packageWrapItemIds").val();
	}
	
	window.location.href = "toAddNewAddress.jhtml?receiverId="+ receiverId + "&cloundServicesPhone=" + cloundServicesPhone +"&productId="+ productId +"&initTotalPrice="+ initTotalPrice +"" +
	"&totalPrice="+ totalPrice +"&paymentMethodId="+ paymentMethodId +"&shippingMethodId="+ shippingMethodId +"" +
	"&selectedPhoneNum="+ selectedPhoneNum +"&isOpenCallsDisplay="+ isOpenCallsDisplay +"&whetherInvoice="+ whetherInvoice +""+
	"&phonePackageId="+ phonePackageId +"&userName="+ userName +"" +
	"&certNumber="+ certNumber +"&cloudServiceId="+ cloudServiceId +"&storageId="+ storageId +"&packageWrapItemIds="+ packageWrapItemIds +"";
}